package com.ssy.lingxi.message.repository;


import com.ssy.lingxi.message.entity.PushDevice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 推送设备仓库类
 * @author yzc
 * @version 2.0.0
 * @date 2020/10/27
 */
@Repository
public interface PushDeviceRepository extends JpaRepository<PushDevice, Long> {

    PushDevice findByRegistrationId(String registrationId);

    List<PushDevice> findAllByMemberIdAndRoleIdAndUserId(Long memberId, Long roleId, Long userId);

}
